//
//  MTOkTishiView.m
//  met
//
//  Created by 李晓俊 on 2019/5/16.
//  Copyright © 2019 李晓俊. All rights reserved.
//

#import "MTOkTishiView.h"

@implementation MTOkTishiView
{
    
    CGRect myframe;
    
}
- (MTOkTishiView *)initWithFrame:(CGRect)frame

{
    self = [super initWithFrame:frame];
    if (self) {
        NSArray *nibs=[[NSBundle mainBundle]loadNibNamed:@"MTOkTishiView" owner:nil options:nil];
        self=[nibs objectAtIndex:0];
        myframe = frame;
        
        self.bgView.layer.borderWidth = 2;
        self.bgView.layer.borderColor = KBlackColor.CGColor;
        
//        self.backgroundView.userInteractionEnabled = YES;
//        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(remove)];
//        [self.backgroundView addGestureRecognizer:tap];
    }
    return self;
}
-(void)drawRect:(CGRect)rect

{
    self.frame=myframe;//关键点在这里
}
- (IBAction)okButClick:(id)sender {
    if (self.goButClick) {
        self.goButClick(@"1");
        [self removeFromSuperview];
    }
}
- (void)remove {
    [self removeFromSuperview];
}
@end
